function openUploadImageForm(id, url)
{
	if(url.substring(url.length-5) == '.html')
		url = url.substring(0, url.length-5);
	uploadForm = window.open(url + '/' + id, 'new_page', 'width=400,height=150');
}

function insertImage(id, imageUrl)
{
	instance = tinyMCE.get(id);
	instance.execCommand("mceInsertContent", false, '<img src="' + imageUrl + '"/>');
	
}